<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@page import="edu.up.beans.ClienteBean"%>
<%@taglib uri="/WEB-INF/tld/components.tld" prefix="up"%>
<%@taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="pp" uri="http://java.sun.com/jsp/jstl/fmt"%>
<jsp:useBean id="agora" class="java.util.Date" />
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> 


<html>


<jsp:include page="header.jsp">
	<jsp:param name="function" value="Login" />
</jsp:include>
<body>
<!-- begin #container -->
<div id="container"><!-- begin #header -->
<div id="header">
<div class="headerBackground"></div>
<div id="navcontainer">
<ul id="navlist">
	<li><a href="index.jsp"><up:label property="menu.home" /></a></li>
	<li><a href="Sonhos.jsp"><up:label property="menu.sonhos" /></a></li>
	<li><a
		href="<%=request.getContextPath()%>/RelatoriosServlet?acao=RelDepoimentos"><up:label
		property="menu.depoimentos" /></a></li>
	<li id="active"><a href="Login.jsp" id="current"><up:label
		property="menu.login" /></a></li>
	<li><a href="Sobre.jsp"><up:label property="menu.sobre" /></a></li>
	<li><up:countryOption country="Brasil" locale="pt_BR" /></li>
	<li><up:countryOption country="USA" locale="en_US" /></li>
	<li><up:countryOption country="Espanha" locale="es_ES" /></li>
	<li><a
		href="<%=request.getContextPath()%>/ControleServlet?funcao=Start"><img
		src="images/logout.png" alt="Logout" /></a></li>
</ul>
</div>
</div>
<!-- end #header --> <!-- begin #mainContent -->
<div id="mainContent" align="center">
<div class="t">
<div class="b">
<div class="l">
<div class="r">
<div class="bl">
<div class="br">
<div class="tl">
<div class="tr"><script>

		  	function validar()
			{
				document.frmLogin.action="<%=request.getContextPath()%>/LoginServlet";
				document.frmLogin.submit();
			}
		
		  </script>
<form id="frmLogin" name="frmLogin" method="post">

<table>
	<tr align="left">
		<td><up:label property="campo.login" /></td>
		<td><input type="text" id="cpUser" name="cpUser" size="40"
			maxlength="35" /></td>
	</tr>
	<tr align="left">
		<td><up:label property="campo.senha" /></td>
		<td><input id="cpPasswd" name="cpPasswd" type="password"
			maxlength="40" size="35" /></td>
	</tr>
	<tr>
		<td align="right"><input type="reset" id="btnReset"
			value="<up:label property="campo.limpar"/>" /></td>
		<td align="right"><input type="button" id="btnSubmit"
			value="<up:label property="campo.ok"/>"
			onclick="javascript:validar();" /></td>
		
		<%String erro = (String) request.getSession().getAttribute("erro"); %>
		
		<c:if test="${erro eq 'erro'}" >
		
						
			<c:set var="sentence" value=" usuario nao econtrado ou senha incorreta " /> 
			<font color='red'><c:out value="${fn:toUpperCase(sentence)}" /> </font>

			
			<up:alertTag/>
		</c:if>
	</tr>
	<tr align="left">
		<td colspan="2"><a href="CadastroCliente.jsp"><small><up:label
			property="campo.cadastre" /></small></a></td>
	</tr>
</table>
</form>

</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- begin #footer -->
<div id="footer"><br />
<br />

&nbsp; &nbsp; <strong><pp:formatDate value="${agora}"
	dateStyle="full" /></strong> &nbsp; &nbsp; || &nbsp; &nbsp; <up:label
	property="rodape.texto" /></div>
<!-- end #footer --></div>

<!-- end #container -->
</body>
</html>
